package com.woniu40.petai_user.service;

import com.woniu40.petai_user.entity.Dynamic;
import com.woniu40.petai_user.entity.Report;
import com.woniu40.petai_user.mapper.ReportMapper;
import com.woniu40.petai_user.vo.ReportVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReportService {

    @Autowired
    ReportMapper reportMapper;

    public int addReport(ReportVo reportVo){
        int insert = reportMapper.insert(reportVo);
        return insert;
    }
    public Dynamic finddynamic(Integer dynamicId){
        return reportMapper.selectdynamictext(dynamicId);
    }

    public List<Report> findDreport(Integer userId, Integer DynamicId){
        return reportMapper.selectDreport( userId,DynamicId);
    }


}
